# =============================================================================
set(LIBHV_ROOT ${COMMON_THIRD_LIB}/libhv)

# 使用 libhv 时，通常使用 json 和 msgpack
include(msgpack)

macro(use_libhv ag_project_name)
  use_msgpack(${ag_project_name})
  
  target_compile_definitions(${ag_project_name} PRIVATE USE_LIB_LIBHV)
  target_compile_definitions(${ag_project_name} PRIVATE HV_STATICLIB)
  
  target_include_directories(${ag_project_name} PRIVATE ${LIBHV_ROOT}/include)
  target_link_directories(${ag_project_name} PRIVATE ${LIBHV_ROOT}/lib/$<CONFIG>)
  target_link_libraries(${ag_project_name} PRIVATE hv_static)
endmacro(use_libhv)